package com.cqkjxy.commons.validations.annotations;


import com.cqkjxy.commons.validations.UniqueColumnValidator;

import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.*;

@Repeatable(value = UniqueColumns.class)
@Target({ ElementType.TYPE })
@Retention(RetentionPolicy.RUNTIME)
@Constraint(validatedBy = UniqueColumnValidator.class)
@Documented
public @interface UniqueColumn {
    String message() default "";
    Class<?>[] groups() default {};
    Class<? extends Payload>[] payload() default {};
    String jpql() default "";
    String field() default "";
    String[] fields() default {};
}